# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ws-attacker
pkgver=1.7
pkgrel=3
groups=('blackarch' 'blackarch-webapp')
pkgdesc='A modular framework for web services penetration testing.'
arch=('any')
url='http://ws-attacker.sourceforge.net/'
license=('custom')
depends=('java-environment')
makedepends=('unzip')
source=("http://downloads.sourceforge.net/project/ws-attacker/WS-Attacker%20$pkgver/WS-Attacker-$pkgver.zip")
sha512sums=('7cf0b23a0be4cfa600cce822fa0a07a889176e24cab2407f4684a8b086f0c10d4efdf2fa700ca18873aa4aa615225f82197ba7fca6d8cfb324d181e0ebcf3f43')

package() {
  cd "WS-Attacker-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec java -jar WS-Attacker-1.7.jar "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

